Support ssh remotes with '#' and '?' in the path to the repository
The same way git does.
Affected repository types are regular git ssh remotes, and also gcrypt
remotes, and potentially also bup remotes.
repoPath is used for such repositories accessed over ssh. uriPath is used
in some other places, eg the bittorrent special remote, where it would not
be appropriate to mimic git's behavior. The distinction seems to hold up
well from what I can see.
The ordering of uriFragment after uriQuery is to correctly handle cases
where both appear in an url. "ssh://localhost/tmp/foo?baz#bar" has an
uriFragment of "#bar" and an uriQuery of "?baz". On the other hand,
"ssh://localhost/tmp/foo#baz?bar" has an uriFragment of "#baz?bar" and no
uriQuery.
Sponsored-by: Dartmouth College's DANDI project